#include "client.hpp"
#include <memory>
#include <string>
#include <cstring>
#include <iostream>
void Usage(const char* program)
{
    std::cout<<"Usage:"<<"\t"<<program<<"ServerIP ServerPort"<<std::endl;
}
int main(int argc,char*argv[])
{
    if(argc!=3)
    {
        //错误
        Usage(argv[0]);
        return 1;
    }
    std::string ip = argv[1];
    uint16_t port = std::stoi(argv[2]);
    std::unique_ptr<yui::UdpClient> user(new yui::UdpClient(ip,port));
    //初始化
    user->InitClient();
    //启动
    user->StartClient();
    return 0;
}